package com.yh.patterns.observer.job;

/**
 * @Author:云尚
 * @Description:测试类
 */
public class Client {
    public static void main(String[] args) {
        //创建观察者目标
        Team team;
        //创建战队
        team=new ConcreteTeam("小羊打嗝");

        //创建观察者
        Observer player1,player2,player3,player4;
        player1=new Player("tom");
        team.join(player1);
        player2=new Player("Jack");
        team.join(player2);
        player3=new Player("Mary");
        team.join(player3);
        player4=new Player("云尚");
        team.join(player4);

        //player1成员遭受攻击
        player1.attacked(team);
    }
}
